package common

import (
	"context"

	"go_admin/api/common/v1"
	"go_admin/internal/service"
)

func (c *ControllerV1) Captcha(ctx context.Context, req *v1.CaptchaReq) (res *v1.CaptchaRes, err error) {
	var (
		idKeyC, base64stringC string
	)
	idKeyC, base64stringC, err = service.Captcha().GetVerifyImgString(ctx)

	res = &v1.CaptchaRes{
		Key: idKeyC,
		Img: base64stringC,
	}
	return
}
